package main

import "fmt"

type Dog struct {
	name  string
	color string
	age   int
}

type Cat struct {
	cat    Dog
	listen string
}

func main() {
	//嵌套，继承了上一个结构体的内容
	var mao Cat
	mao.cat.name = "狸猫"
	mao.cat.color = "花色"
	mao.cat.age = 1
	mao.listen = "喵喵"
	fmt.Println(mao) //{{狸猫 花色 1} 喵喵}
}
